package com.example.demo.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogUtil {

	private static Logger log = LoggerFactory.getLogger(LogUtil.class);

	private static LogUtil instance = new LogUtil();

	private LogUtil() {

	}

	public static LogUtil getInstance() {
		return instance;
	}

	public void logInfo(String message) {
		log.info(message);
	}

	public void logInfo(String message, Throwable t) {
		log.info(message, t);
	}

	public void logWarn(String message) {
		log.warn(message);
	}

	public void logWarn(String message, Throwable t) {
		log.warn(message, t);
	}
	
	public void logError(String message) {
		log.error(message);
	}

	public void logError(String message, Throwable t) {
		t.printStackTrace();
		log.error(message, t);
	}

}
